<template>
  <div>
    <div class="nav">
      <button @click="toPage(0)">导出标注结果</button>&nbsp;
      <button @click="toPage(1)">审核标注结果</button>&nbsp;
      <button @click="toPage(2)">需求方反馈</button>&nbsp;
      <button @click="toPage(3)">需求方首页</button>&nbsp;
      <button @click="toPage(4)">任务创建</button>&nbsp;
      <button @click="toPage(5)">任务详情</button>&nbsp;
      <button @click="toPage(6)">数据上传</button>&nbsp;
    </div>
    <router-view></router-view>  
  </div>
</template>

<script setup>
import { ref } from "vue";
import { useRouter, useRoute } from "vue-router";

import { get } from "@/common";

const router = useRouter();

const pathes = [
  "/demand_home/demand_download",
  "/demand_home/demand_examine",
  "/demand_home/demand_feedback",
  "/demand_home/demand_index",
  "/demand_home/demand_task_design",
  "/demand_home/demand_task_detail",
  "/demand_home/demand_upload",
];

router.push({ path: "/demand_home/demand_index" });

const toPage = temp_index => {
  router.push({ path: pathes[temp_index] });
};
</script>

<style>
.nav {
  height: 50px;
  width: 100%;
  text-align: center;
  box-shadow: 0px 1px 5px 5px rgba(0, 0, 0, 0.05);
}
</style>